<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增货位管理')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-space-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label">货位编号：</label>
                <div class="col-sm-8">
                    <input name="cargoSpaceId" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">所属仓库：</label>
                <div class="col-sm-8">
                    <select name="warehouseId" class="form-control m-b" th:with="type=${@dict.getType('is_house')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">类型名：</label>
                <div class="col-sm-8">
                    <input name="theTypeName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">货位名称：</label>
                <div class="col-sm-8">
                    <input name="cargoSpaceName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">排：</label>
                <div class="col-sm-8">
                    <input name="thePlatoon" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">列：</label>
                <div class="col-sm-8">
                    <input name="theColumn" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">层：</label>
                <div class="col-sm-8">
                    <input name="theFloor" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">状态：</label>
                <div class="col-sm-8">
                    <div class="radio-box" th:each="dict : ${@dict.getType('space_status')}">
                        <input type="radio" th:id="${'status_' + dict.dictCode}" name="status" th:value="${dict.dictValue}" th:checked="${dict.default}">
                        <label th:for="${'status_' + dict.dictCode}" th:text="${dict.dictLabel}"></label>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">货位锁：</label>
                <div class="col-sm-8">
                    <select name="locked" class="form-control m-b" th:with="type=${@dict.getType('space_locked')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">托盘编码：</label>
                <div class="col-sm-8">
                    <input name="trayCode" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">是否双伸：</label>
                <div class="col-sm-8">
                    <input name="issDouble" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">同组货位：</label>
                <div class="col-sm-8">
                    <input name="groupCodingNo" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">同组货位编码：</label>
                <div class="col-sm-8">
                    <input name="groupCoding" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">双伸标识：</label>
                <div class="col-sm-8">
                    <select name="cargoSpaceLogo" class="form-control m-b" th:with="type=${@dict.getType('space_ds')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">当前货区：</label>
                <div class="col-sm-8">
                    <input name="thisCargoArea" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "device/space"
        $("#form-space-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-space-add').serialize());
            }
        }
    </script>
</body>
</html>